package com.bamboo.demo.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @author
 * @version 1.0
 * @date 2020-07-04
 */
public class ExcelListener extends AnalysisEventListener<ExcelData> {

    /**
     * 一行一行读取
     */
    @Override
    public void invoke(ExcelData excelData, AnalysisContext analysisContext) {

    }

    /**
     * 读取完之后
     */
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }

    /**
     * 读取表头
     */
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头：" + headMap);
    }
}
